﻿// ////////////////////////////////////////////////////////////////////////////
// 
// SWE Case Tool
// 
// Solution:	CaseTool
// Project:		1. CaseTool
// Filename:	IMethodGUI.cs
// 
// File Created:	18:29 29.05.2013 
// Last Changed:	18:11 05.06.2013
// 
// ////////////////////////////////////////////////////////////////////////////

namespace SWE.CaseTool
{
	/// <summary>
	/// Optional interface for a method specific gui. If a method specific gui inherits from
	/// this interface, the factory will call the SetMethod method while creating the gui!
	/// This is the only way for passing a method to a method specific gui.
	/// IMPORTANT: SetMethod will only be called if the gui also has the MethodGUI attribute!
	/// For more information see the method gui attribute.
	/// </summary>
	public interface IMethodGUI
	{
		/// <summary>
		/// Sets the method which should be displayed in the gui. The method factory creates or loads a method
		/// and hands it, while creating the window, over to the window using this method.
		/// </summary>
		/// <param name="method">The method.</param>
		void SetMethod(IMethod method);

		/// <summary>
		/// Returns the mehtods which is displayed in this gui.
		/// </summary>
		/// <returns>the method.</returns>
		IMethod GetMethod();
	}
}